package pl.prac06;
// $ANTLR 3.4 Analex2.g 2012-10-31 18:37:03

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class Analex2 extends Lexer {
    public static final int EOF=-1;
    public static final int BLANCO=4;
    public static final int DIGITO=5;
    public static final int NUMERO=6;
    public static final int OPERADOR1=7;
    public static final int OPERADOR2=8;
    public static final int PARENTESIS=9;
    public static final int SEPARADOR=10;

    // delegates
    // delegators
    public Lexer[] getDelegates() {
        return new Lexer[] {};
    }

    public Analex2() {} 
    public Analex2(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public Analex2(CharStream input, RecognizerSharedState state) {
        super(input,state);
    }
    public String getGrammarFileName() { return "Analex2.g"; }

    // $ANTLR start "BLANCO"
    public final void mBLANCO() throws RecognitionException {
        try {
            int _type = BLANCO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // Analex2.g:11:8: ( ( ' ' | '\\t' | '\\r' | '\\n' ) )
            // Analex2.g:11:10: ( ' ' | '\\t' | '\\r' | '\\n' )
            {
            if ( (input.LA(1) >= '\t' && input.LA(1) <= '\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
                input.consume();
                state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( state.backtracking==0 ) { _channel=HIDDEN;}

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "BLANCO"

    // $ANTLR start "DIGITO"
    public final void mDIGITO() throws RecognitionException {
        try {
            // Analex2.g:13:17: ( '0' .. '9' )
            // Analex2.g:
            {
            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                input.consume();
                state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DIGITO"

    // $ANTLR start "NUMERO"
    public final void mNUMERO() throws RecognitionException {
        try {
            int _type = NUMERO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // Analex2.g:14:8: ( ( DIGITO )+ ( '.' ( DIGITO )+ )? )
            // Analex2.g:14:10: ( DIGITO )+ ( '.' ( DIGITO )+ )?
            {
            // Analex2.g:14:10: ( DIGITO )+
            int cnt1=0;
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( ((LA1_0 >= '0' && LA1_0 <= '9')) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // Analex2.g:
            	    {
            	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
            	        input.consume();
            	        state.failed=false;
            	    }
            	    else {
            	        if (state.backtracking>0) {state.failed=true; return ;}
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    if ( cnt1 >= 1 ) break loop1;
            	    if (state.backtracking>0) {state.failed=true; return ;}
                        EarlyExitException eee =
                            new EarlyExitException(1, input);
                        throw eee;
                }
                cnt1++;
            } while (true);


            // Analex2.g:14:19: ( '.' ( DIGITO )+ )?
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( (LA3_0=='.') ) {
                alt3=1;
            }
            switch (alt3) {
                case 1 :
                    // Analex2.g:14:20: '.' ( DIGITO )+
                    {
                    match('.'); if (state.failed) return ;

                    // Analex2.g:14:23: ( DIGITO )+
                    int cnt2=0;
                    loop2:
                    do {
                        int alt2=2;
                        int LA2_0 = input.LA(1);

                        if ( ((LA2_0 >= '0' && LA2_0 <= '9')) ) {
                            alt2=1;
                        }


                        switch (alt2) {
                    	case 1 :
                    	    // Analex2.g:
                    	    {
                    	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                    	        input.consume();
                    	        state.failed=false;
                    	    }
                    	    else {
                    	        if (state.backtracking>0) {state.failed=true; return ;}
                    	        MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        recover(mse);
                    	        throw mse;
                    	    }


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt2 >= 1 ) break loop2;
                    	    if (state.backtracking>0) {state.failed=true; return ;}
                                EarlyExitException eee =
                                    new EarlyExitException(2, input);
                                throw eee;
                        }
                        cnt2++;
                    } while (true);


                    }
                    break;

            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUMERO"

    // $ANTLR start "OPERADOR1"
    public final void mOPERADOR1() throws RecognitionException {
        try {
            int _type = OPERADOR1;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // Analex2.g:15:11: ( '+' | '-' )
            // Analex2.g:
            {
            if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
                input.consume();
                state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "OPERADOR1"

    // $ANTLR start "OPERADOR2"
    public final void mOPERADOR2() throws RecognitionException {
        try {
            int _type = OPERADOR2;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // Analex2.g:16:11: ( '/' | '*' )
            // Analex2.g:
            {
            if ( input.LA(1)=='*'||input.LA(1)=='/' ) {
                input.consume();
                state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "OPERADOR2"

    // $ANTLR start "PARENTESIS"
    public final void mPARENTESIS() throws RecognitionException {
        try {
            int _type = PARENTESIS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // Analex2.g:17:12: ( '(' | ')' )
            // Analex2.g:
            {
            if ( (input.LA(1) >= '(' && input.LA(1) <= ')') ) {
                input.consume();
                state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "PARENTESIS"

    // $ANTLR start "SEPARADOR"
    public final void mSEPARADOR() throws RecognitionException {
        try {
            int _type = SEPARADOR;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // Analex2.g:18:11: ( ';' )
            // Analex2.g:18:13: ';'
            {
            match(';'); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "SEPARADOR"

    public void mTokens() throws RecognitionException {
        // Analex2.g:1:8: ( BLANCO | NUMERO | OPERADOR1 | OPERADOR2 | PARENTESIS | SEPARADOR )
        int alt4=6;
        switch ( input.LA(1) ) {
        case '\t':
        case '\n':
        case '\r':
        case ' ':
            {
            alt4=1;
            }
            break;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            {
            alt4=2;
            }
            break;
        case '+':
        case '-':
            {
            alt4=3;
            }
            break;
        case '*':
        case '/':
            {
            alt4=4;
            }
            break;
        case '(':
        case ')':
            {
            alt4=5;
            }
            break;
        case ';':
            {
            alt4=6;
            }
            break;
        default:
            if (state.backtracking>0) {state.failed=true; return ;}
            NoViableAltException nvae =
                new NoViableAltException("", 4, 0, input);

            throw nvae;

        }

        switch (alt4) {
            case 1 :
                // Analex2.g:1:10: BLANCO
                {
                mBLANCO(); if (state.failed) return ;


                }
                break;
            case 2 :
                // Analex2.g:1:17: NUMERO
                {
                mNUMERO(); if (state.failed) return ;


                }
                break;
            case 3 :
                // Analex2.g:1:24: OPERADOR1
                {
                mOPERADOR1(); if (state.failed) return ;


                }
                break;
            case 4 :
                // Analex2.g:1:34: OPERADOR2
                {
                mOPERADOR2(); if (state.failed) return ;


                }
                break;
            case 5 :
                // Analex2.g:1:44: PARENTESIS
                {
                mPARENTESIS(); if (state.failed) return ;


                }
                break;
            case 6 :
                // Analex2.g:1:55: SEPARADOR
                {
                mSEPARADOR(); if (state.failed) return ;


                }
                break;

        }

    }


    public static void main(String[] args) {}

}